package com.hit.aircraftwar.aircraft;


import com.hit.aircraftwar.activity.MainActivity;
import com.hit.aircraftwar.bullet.AbstractBullet;
import com.hit.aircraftwar.strategy.ShootStrategy;

import java.util.List;

/**
 * @author LiuYuZhe
 */
public class Boss extends AbstractAircraft {

    public Boss(int locationX, int locationY, int speedX, int speedY, int hp, ShootStrategy shootStrategy, int direction, int power, int shootNum) {
        super(locationX, locationY, speedX, speedY, hp, shootStrategy, direction, power, shootNum);
    }

    @Override
    public void forward() {
        locationX += speedX;
        int moveRangeMax = MainActivity.height / 4;
        if(locationY < moveRangeMax) {
            locationY += speedY;
        }
        if(locationX <= 0 || locationX >= MainActivity.width) {
            speedX = -speedX;
        }
    }


    @Override
    public List<AbstractBullet> shoot(AbstractAircraft abstractAircraft) {
        return abstractAircraft.shootStrategy.shoot(abstractAircraft);
    }

    @Override
    public void bombed() {

    }
}
